:root {
    --primary: #1a4b8c;
    --secondary: #ff6b35;
    --light: #f5f7fa;
    --dark: #2d3748;
    --gray: #718096;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f0f2f5;
    color: var(--dark);
    line-height: 1.6;
}

/* 导航栏样式 */
.no-wrap {
    white-space: nowrap;
}
/* 导航栏优化样式 */
.navbar {
    background-color: var(--primary);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-radius: 0 0 12px 12px; /* 底部圆角 */
    overflow: hidden;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: bold;
}

.logo i {
    color: var(--secondary);
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    width: 100%;
}

.nav-item {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px; /* 导航项圆角 */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    font-size: 0.9rem;
}

.nav-item i {
    min-width: 18px;
    text-align: center;
}

.nav-item:hover, .nav-item.active {
    background-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-menu-btn {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: var(--secondary);
    transform: scale(1.05);
}

.login-link {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: var(--primary);
        flex-direction: column;
        justify-content: center;
        gap: 1.5rem;
        padding: 2rem;
        transition: left 0.4s ease;
        z-index: 99;
        border-radius: 0 12px 12px 0;
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-item {
        font-size: 1.1rem;
        padding: 0.75rem 1.5rem;
    }

    .nav-actions {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.75rem 1rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .nav-item {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo i {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    background-color: var(--secondary);
}

.nav-links a.active {
    background-color: var(--secondary);
}


/* 主内容区样式 */
.container {
    max-width: 1920px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.section {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.section-title {
    color: var(--primary);
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 工具卡片样式 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.tool-card {
    background: var(--light);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e2e8f0;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.tool-icon {
    background: var(--primary);
    color: white;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.tool-content {
    padding: 1.5rem;
}

.tool-content h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.tool-content p {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.btn {
    white-space: nowrap;
    font-size: 1rem;
    display: inline-block;
    background: var(--secondary);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    /* font-weight: 500; */
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #e05a2a;
    transform: scale(1.05);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
}

.btn-primary:hover {
    /* background-color: var(--primary-dark); */
    background-color: var(--primary);
    transform: scale(1.05);
}

/* 轮播图样式 */
.carousel {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.6);
    padding: 1rem;
    border-radius: 5px;
    max-width: 80%;
}

.carousel-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.carousel-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-btn.active {
    background: var(--secondary);
    transform: scale(1.2);
}

/* 表单验证样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 75, 140, 0.2);
}

.error-message {
    color: #e53e3e;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: none;
}

/* 媒体控制区样式 */
.media-section {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.media-player {
    flex: 1;
    min-width: 300px;
    background: var(--light);
    border-radius: 8px;
    overflow: hidden;
}

.media-header {
    background: var(--primary);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.media-controls {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.progress-container {
    background: #cbd5e0;
    border-radius: 5px;
    height: 6px;
    cursor: pointer;
}

.progress-bar {
    height: 100%;
    background: var(--secondary);
    border-radius: 5px;
    width: 0%;
}

.control-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.control-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    color: var(--secondary);
    transform: scale(1.1);
}

/* 页脚样式 */
footer {
    background: var(--primary);
    color: white;
    padding: 3rem 5% 1.5rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h3 {
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-column h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--secondary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.side-links {
    display: flex;
    flex-direction: column;
    list-style: none;
}

.side-links a {
    display: block;
    padding: 0.5rem 0;
    text-decoration: none;
    color: black;
    transition: padding-left 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
}

.side-links a:hover {
    text-decoration: none;
    display: block;
    color: black;
    padding: 0.5rem 0;
    padding-left: 1rem;
    transition: padding-left 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
}

.footer-links a:hover {
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0aec0;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 1rem;
    }

    .nav-links {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {
    .section {
        padding: 1.5rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* 选项卡样式 */
.tabs {
    margin-bottom: 2rem;
}

.tab-header {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--secondary);
}

.tab-content {
    padding: 1.5rem 0;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.4s ease;
    padding: 1.5rem;
    overflow-y: auto;
}

.sidebar.active {
    right: 0;
}

.close-sidebar {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
}

/* 地图容器 */
#map {
    height: 400px;
    border-radius: 8px;
    margin-top: 1rem;
}

/* 天气卡片 */
.weather-card {
    background: linear-gradient(135deg, #1a4b8c, #3a7bd5);
    color: white;
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.temp {
    font-size: 3rem;
    font-weight: bold;
    margin: 1rem 0;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
    margin-top: 1rem;
}

.weather-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

/* 广告栏 */
.ad-banner {
    background: linear-gradient(90deg, #ff6b35, #ff9a3d);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
}

.ad-banner::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: rotate(45deg) translateX(-100%);
    }
    100% {
        transform: rotate(45deg) translateX(100%);
    }
}

.close-ad {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
}

/* 无缝滚动 */
.ticker-container {
    background: var(--primary);
    color: white;
    padding: 0.8rem 0;
    overflow: hidden;
    position: relative;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.ticker {
    display: flex;
    white-space: nowrap;
    animation: ticker-scroll 20s linear infinite;
}

.ticker-item {
    padding: 0 2rem;
    display: flex;
    align-items: center;
}

.ticker-item i {
    color: var(--secondary);
    margin-right: 0.5rem;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.username {
    padding-right: 1.25rem;
    padding-top: 1px;
    font-size: 1.25rem;
}